﻿
var atmeSearch = function () {
    var url = window.location.href;
    if ($("#searchkeyword").val() != "查找@我微博" && $.trim($("#searchkeyword").val())) {
        url = App.AddQueryToUrl(url, "Key", encodeURIComponent($.trim($("#searchkeyword").val())));
    } else {
        url = App.RemoveQueryFromUrl(url, "Key");
    }
    if ($("input[name='arelation']:checked").val() == 1) {
        url = App.AddQueryToUrl(url, "IsFollow", "1");
    }
    else {
        url = App.RemoveQueryFromUrl(url, "IsFollow");
    }
    if ($("input[name='atype']:checked").val() == 1) {
        url = App.AddQueryToUrl(url, "IsOri", "1");
    } else {
        url = App.RemoveQueryFromUrl(url, "IsOri");
    }
    window.location.href = url;
}
$("#startFilter").click(function () {
    $("#atmeFilter").fadeIn();
    $("#atmeBar").hide();
});
$("#cancelFilter").click(function () {
    $("#atmeFilter").fadeOut(function () { $("#atmeBar").show(); });

});
$("#searchkeyword").JQP_HighLineInput2({ nullCon: "查找@我微博" }).keyup(function (e) {
    if (e.which == 13) {
        atmeSearch();
    }
});
$("#search_btn").click(function () {
    atmeSearch();
});
                    